package com.hera.process.config.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hera.base.util.FiltroDTO;
import com.hera.process.config.dao.ProcessSupervisorDao;
import com.hera.process.config.service.ProcessSupervisroService;
import com.hera.process.workflow.domain.ProcessSupervisor;
import com.hera.process.workflow.domain.ProcessSupervisorPK;
import com.vaadin.annotations.AutoGenerated;

@Service("processsupervisorservice")
public class ProcessSupervisorServiceImpl implements ProcessSupervisroService{
	
	static final Logger logger = Logger.getLogger(ProcessSupervisorServiceImpl.class);
	
	@Autowired
	private ProcessSupervisorDao processsupervisrodao;
	
	@Override
	public ProcessSupervisor findById(ProcessSupervisorPK id) {
		
		return processsupervisrodao.findOne(id);
	}

	@Override
	public void update(ProcessSupervisor entity) {
		
		processsupervisrodao.save(entity);
	}

	@Override
	public void save(ProcessSupervisor entity) {
		
		processsupervisrodao.save(entity);
	}

	@Override
	public void delete(ProcessSupervisor entity) {
		
		processsupervisrodao.delete(entity);
	}

	@Override
	public List<ProcessSupervisor> findAll() {
		
		return processsupervisrodao.findAll();
	}

	@Override
	public List<ProcessSupervisor> findAll(FiltroDTO filtroDTO) {
		
		return processsupervisrodao.obtenerEntidadesPorFiltros(filtroDTO);
	}

}
